Calculate Power of a Number - Java Code